/*
 * 项目名称:    wms-server-jeecg
 * 创建人员:    FangYongliang
 * 创建时间:    2023-09-22
 */
package org.jeecg.modules.dock.entity.dto.request;

import lombok.Getter;
import lombok.Setter;
import org.jeecg.modules.dock.constant.SystemConstants;
import org.jeecg.modules.dock.entity.mes.request.VerticalCuttingIsCalledPaperTubeRequestVO;

import java.util.ArrayList;
import java.util.List;

/**
 * //TODO 【请填写类描述】
 *
 * @author FangYongliang
 * @version 1.0.0
 * @since 2023-09-22
 */
@Setter
@Getter
public class ZJCallBucketRequest extends BaseRequestDTO<CoilStockDetail>{

    public ZJCallBucketRequest() {
        super(SystemConstants.TaskType.ZJ_TAKE_PAPER);
    }

    /**纸筒仓叫料站点*/
    private String prepareSite = "C-03";

    public void setDetails(List<VerticalCuttingIsCalledPaperTubeRequestVO.Detail> details){
        ArrayList<CoilStockDetail> coilStockDetails = new ArrayList<>();
        for (VerticalCuttingIsCalledPaperTubeRequestVO.Detail detail : details) {
            CoilStockDetail stockDetail = new CoilStockDetail();
            stockDetail.setQuantity(detail.getNumber());
            stockDetail.setSpecifications(detail.getSpec());
            coilStockDetails.add(stockDetail);
        }
        setDetail(coilStockDetails);
    }


}
